Namespace Kardex
Public Class Almacen
	Inherits Auditoria.Transaccion

	Private vAlmacenID As Integer = -1
	Private vNombre As String = ""
	Private vLocalId As Integer = -1
	Private vLocalNombre As string =""
	Private vEstado As Integer = -1
	Private vPrincipal As Integer = -1

	Public Property AlmacenID() As Integer
		Get
			Return vAlmacenID
		End Get
		Set(ByVal Value As Integer)
			vAlmacenID = Value
		End Set
	End Property

	Public Property Nombre() As String
		Get
			Return vNombre
		End Get
		Set(ByVal Value As String)
			vNombre = Value
		End Set
	End Property

	Public Property LocalId() As Integer
		Get
			Return vLocalId
		End Get
		Set(ByVal Value As Integer)
			vLocalId = Value
		End Set
	End Property

	Public Property LocalNombre() as string
		Get
			Return vLocalNombre
		End Get
		Set(ByVal Value As string)
			vLocalNombre = Value
		End Set
	End Property

	Public Property Estado() As Integer
		Get
			Return vEstado
		End Get
		Set(ByVal Value As Integer)
			vEstado = Value
		End Set
	End Property

	Public Property Principal() As Integer
		Get
			Return vPrincipal
		End Get
		Set(ByVal Value As Integer)
			vPrincipal = Value
		End Set
	End Property

	Sub New()
	End Sub

	Sub New(ByRef AlmacenID As Integer, ByVal Nombre As String, ByVal LocalId As Integer, ByVal Estado As Integer, ByVal Principal As Integer)
		vAlmacenID = AlmacenID
		vNombre = Nombre
		vLocalId = LocalId
		vEstado = Estado
		vPrincipal = Principal
	End Sub

End Class



 Public Class AlmacenCol   
 Inherits System.Collections.CollectionBase
Private _enmSortDirection As SortDirection
Public Sub New()
_enmSortDirection = SortDirection.Asc
End Sub
Public Sub Sort(ByVal sortExpression As String, ByVal sortDirection As SortDirection)
InnerList.Sort(New Comparer(sortExpression, SortDirection))
End Sub
Public Sub Sort(ByVal sortExpression As String)
InnerList.Sort(New Comparer(sortExpression, _enmSortDirection))
If _enmSortDirection = SortDirection.Asc Then
_enmSortDirection = SortDirection.Desc
Else
_enmSortDirection = SortDirection.Asc
End If
End Sub
Public Function Add(ByVal obj As Almacen) As Integer
Return MyBase.List.Add(obj)
End Function
Public Sub AddPrimero(ByVal obj As Almacen)
MyBase.List.Insert(0, obj)
End Sub
Public ReadOnly Property Almacen(ByVal Index As Integer) As Almacen
Get
Return CType(MyBase.List(Index), Almacen)
End Get
End Property
End Class
end namespace

